package com.sfilyh.servelt.admin;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.sfilyh.util.DBUtil;


@WebServlet("/bz-admin/listCategory")
public class listCategory extends HttpServlet {
	private static final long serialVersionUID = 1L;
    
	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String sql = "select * from tb_category order by sort";
		request.setAttribute("categoryList", DBUtil.queryForListMap(sql));
		request.getRequestDispatcher("/WEB-INF/views/admin/listCategory.jsp").forward(request, response);
	}
	
}
